/*
 * Decompiled with CFR 0.150.
 * 
 * Could not load the following classes:
 *  cn.hutool.core.date.DateTime
 *  cn.hutool.core.date.DateUtil
 *  cn.hutool.core.thread.ThreadUtil
 *  cn.hutool.core.util.ObjectUtil
 *  com.alibaba.fastjson.JSON
 *  de.felixroske.jfxsupport.FXMLController
 *  de.felixroske.jfxsupport.GUIState
 *  de.jensd.fx.glyphs.fontawesome.FontAwesomeIconView
 *  javafx.application.Platform
 *  javafx.collections.ObservableList
 *  javafx.event.ActionEvent
 *  javafx.event.Event
 *  javafx.event.EventHandler
 *  javafx.fxml.FXML
 *  javafx.fxml.Initializable
 *  javafx.geometry.Pos
 *  javafx.scene.Node
 *  javafx.scene.Parent
 *  javafx.scene.Scene
 *  javafx.scene.control.Alert
 *  javafx.scene.control.Alert$AlertType
 *  javafx.scene.control.Button
 *  javafx.scene.control.Label
 *  javafx.scene.control.ScrollPane
 *  javafx.scene.control.Tab
 *  javafx.scene.control.TabPane
 *  javafx.scene.control.TitledPane
 *  javafx.scene.control.Tooltip
 *  javafx.scene.layout.BorderPane
 *  javafx.scene.layout.StackPane
 *  javafx.scene.layout.VBox
 *  javafx.stage.Modality
 *  javafx.stage.Popup
 *  javafx.stage.Stage
 *  javafx.stage.WindowEvent
 *  org.slf4j.Logger
 *  org.slf4j.LoggerFactory
 *  org.springframework.beans.factory.annotation.Autowired
 */
package com.gys.controller.index;

import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.gys.GysApplication;
import com.gys.common.business.DailyReconcileUtil;
import com.gys.common.business.GysUtil;
import com.gys.common.data.HttpJson;
import com.gys.common.util.CacheUtil;
import com.gys.common.util.CommonUtil;
import com.gys.common.util.SpringUtil;
import com.gys.controller.BaseController;
import com.gys.controller.TopController;
import com.gys.controller.baseSetting.localSetting.LocalSettingController;
import com.gys.controller.baseSetting.saleSchedule.ProductSortSettingController;
import com.gys.controller.baseSetting.saleSchedule.SaleBillSettingController;
import com.gys.controller.baseSetting.saleSchedule.SaleScheduleSettingController;
import com.gys.controller.baseSetting.saleSchedule.ShopSortSettingController;
import com.gys.controller.example.ExampleController;
import com.gys.controller.member.MemberAddOrEditController;
import com.gys.controller.member.MemberCardReportController;
import com.gys.controller.member.MemberPointReportController;
import com.gys.controller.member.SaleDetailReportController;
import com.gys.controller.salesReceipts.SalesReceiptsMainController;
import com.gys.data.LocalSetting.LocalSettingOutData;
import com.gys.data.dailyReconcile.DailyReconcileInData;
import com.gys.data.example.GetResourceOutData;
import com.gys.data.example.GetUserOutData;
import com.gys.view.RestPasswordView;
import com.gys.view.index.ChangeTipView;
import de.felixroske.jfxsupport.FXMLController;
import de.felixroske.jfxsupport.GUIState;
import de.jensd.fx.glyphs.fontawesome.FontAwesomeIconView;
import java.net.URL;
import java.util.Calendar;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.ResourceBundle;
import java.util.Timer;
import java.util.TimerTask;
import javafx.application.Platform;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.event.Event;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
import javafx.scene.control.TitledPane;
import javafx.scene.control.Tooltip;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.stage.Modality;
import javafx.stage.Popup;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

@FXMLController
public class IndexController
extends BaseController
implements Initializable {
    private static final Logger log = LoggerFactory.getLogger(IndexController.class);
    @FXML
    public BorderPane borderPane;
    @FXML
    private VBox bigLeftPane;
    @FXML
    private VBox smallLeftPane;
    @FXML
    private ScrollPane leftPane;
    @FXML
    public ScrollPane scrollContentPane;
    @FXML
    private StackPane contentPane;
    @Autowired
    private MemberAddOrEditController memberController;
    @Autowired
    private LocalSettingController localSettingController;
    @Autowired
    private SaleScheduleSettingController saleScheduleSettingController;
    @Autowired
    private ExampleController exampleController;
    @Autowired
    private ShopSortSettingController shopSortSettingController;
    @Autowired
    private ProductSortSettingController productSortSettingController;
    @Autowired
    private SaleBillSettingController saleBillSettingController;
    @Autowired
    private MemberCardReportController memberCardReportController;
    @Autowired
    private MemberPointReportController memberPointReportController;
    @Autowired
    private SaleDetailReportController saleDetailReportController;
    @Autowired
    private TopController topController;
    private Map<Button, Popup> popupMap = new HashMap<Button, Popup>();
    private Map<String, GetResourceOutData> childMenueMap = new HashMap<String, GetResourceOutData>();
    public TabPane tabPane = new TabPane();
    public Map<String, Tab> tabMap = new HashMap<String, Tab>();
    boolean flag = false;
    public static Stage stage;
    public static Map<String, Node> nodeMap;
    @Autowired
    private SalesReceiptsMainController salesReceiptsMainController;
    public Timer timer = new Timer();

    @Override
    public void init() {
        if (ObjectUtil.isEmpty(this.borderPane)) {
            return;
        }
        this.changeTip();
        ObservableList tabs = this.tabPane.getTabs();
        for (int i = 0; i < tabs.size(); ++i) {
            Tab tab = (Tab)tabs.get(i);
            this.tabMap.remove(tab.getId());
        }
        this.tabPane.getTabs().clear();
        this.expandTitlePanes();
        this.contentPane.getChildren().add(new Label("welcome!"));
    }

    private void changeTip() {
        DateTime date;
        String dateStr;
        LocalSettingOutData outData = new LocalSettingOutData();
        if (!this.localSettingController.getSet(outData)) {
            return;
        }
        if (ObjectUtil.isNotEmpty(outData.getGsstDailyChangeDate())) {
            dateStr = DateUtil.today() + " " + outData.getGsstDailyChangeDate() + ":00";
            date = DateUtil.parse((String)dateStr);
            this.timer = new Timer();
            this.timer.schedule(new TimerTask(){

                @Override
                public void run() {
                    Platform.runLater((Runnable)new Runnable(){

                        @Override
                        public void run() {
                            CommonUtil.showView(ChangeTipView.class, Modality.APPLICATION_MODAL);
                        }
                    });
                }
            }, (Date)date);
        }
        if (ObjectUtil.isNotEmpty(outData.getGsstDailyCloseDate())) {
            dateStr = DateUtil.today() + " " + outData.getGsstDailyCloseDate() + ":00";
            date = DateUtil.parse((String)dateStr);
            this.timer = new Timer();
            this.timer.schedule(new TimerTask(){

                @Override
                public void run() {
                    Platform.runLater((Runnable)new Runnable(){

                        @Override
                        public void run() {
                            Alert alert = IndexController.this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u7cfb\u7edf\u95ed\u5e97\u540e\u7684\u9500\u552e\uff0c\u5f52\u5230\u7b2c\u4e8c\u5929\u5f00\u5e97\u65f6\u95f4");
                            alert.showAndWait();
                        }
                    });
                }
            }, (Date)date);
        }
    }

    @FXML
    public void leftNaveClick(ActionEvent e) {
        Node parent = (Node)e.getSource();
        if (parent instanceof Button) {
            this.scrollContentPane.setOnKeyReleased(null);
            Object userData = ((Button)parent).getUserData();
            if (userData == null) {
                return;
            }
            this.changeView(userData.toString());
        }
    }

    public void changeView(String userData) {
        Object controller;
        BorderPane borderPane;
        this.tabPane.setStyle("-fx-background-color: #F7FAFB;");
        final GetResourceOutData childMenue = this.childMenueMap.get(userData);
        String topLabel = childMenue.getTitle();
        if ("salesReceiptsMain".equals(userData)) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", null);
            String msg = "";
            DailyReconcileInData inData = new DailyReconcileInData();
            Date today = new Date();
            Calendar c = Calendar.getInstance();
            c.setTime(today);
            c.add(5, -1);
            inData.setGpdhSaleDate(DateUtil.format((Date)c.getTime(), (String)"yyyyMMdd"));
            HttpJson rsp = DailyReconcileUtil.checkDailyReconcileInfo(inData);
            msg = rsp.getMsg();
            if (msg.contains("\u672a\u505a\u65e5\u7ed3\u5bf9\u8d26")) {
                alert.setContentText(rsp.getMsg());
                alert.showAndWait();
                return;
            }
            CacheUtil.put("isMainCurrentView", true);
            if (ObjectUtil.isEmpty(stage)) {
                stage = new Stage();
                stage.setResizable(false);
                Stage stageF = GUIState.getStage();
                stage.setMaxHeight(stageF.getHeight());
                stage.setMinHeight(stageF.getHeight());
                stage.setMaxWidth(stageF.getWidth());
                stage.setMinWidth(stageF.getWidth());
                stage.getIcons().addAll((Collection)stageF.getIcons());
                Node centerNode = this.loadFxml(childMenue.getPath(), SpringUtil.getBean(childMenue.getPagePath()));
                Scene scene = new Scene((Parent)centerNode);
                stage.setScene(scene);
            }
            ((BaseController)SpringUtil.getBean(childMenue.getPagePath())).init();
            stage.show();
            if (!stage.isFocused()) {
                stage.requestFocus();
            }
            return;
        }
        CacheUtil.put("isMainCurrentView", false);
        CacheUtil.put("userData", userData);
        Node top = this.loadFxml("/fxml/Top.fxml", this.topController);
        if (ObjectUtil.isEmpty(this.tabMap.get(userData))) {
            final Tab tab = new Tab(topLabel);
            tab.setStyle("-fx-background-color: #F7FAFB;");
            tab.setId(userData);
            tab.setContent(top);
            tab.setOnClosed((EventHandler)new EventHandler<Event>(){

                public void handle(Event e) {
                    IndexController.this.tabMap.remove(tab.getId());
                }
            });
            tab.setOnSelectionChanged((EventHandler)new EventHandler<Event>(){

                public void handle(Event e) {
                    if (IndexController.this.flag) {
                        IndexController.this.scrollContentPane.setOnKeyReleased(null);
                        IndexController.this.init(childMenue);
                    }
                }
            });
            borderPane = this.topController.getBorderPane();
            controller = SpringUtil.getBean(childMenue.getPagePath());
            this.tabPane.getTabs().add(tab);
            this.flag = false;
            this.tabPane.getSelectionModel().select(tab);
            this.flag = true;
            if (ObjectUtil.isNotEmpty(userData)) {
                this.tabMap.put(userData, tab);
            }
        } else {
            this.tabPane.getSelectionModel().select(this.tabMap.get(userData));
            this.init(childMenue);
            return;
        }
        Node centerNode = this.loadFxml(childMenue.getPath(), controller);
        borderPane.setCenter(centerNode);
        BorderPane.setAlignment((Node)centerNode, (Pos)Pos.TOP_LEFT);
        this.topController.getTopText().setText(topLabel);
        this.changeView((Node)this.tabPane);
        this.init(childMenue);
    }

    public void init(GetResourceOutData childMenue) {
        BaseController controllerTemp = SpringUtil.getBean(childMenue.getPagePath(), BaseController.class);
        controllerTemp.init();
    }

    public void initialize(URL location, ResourceBundle resources) {
        GUIState.getStage().setOnCloseRequest((EventHandler)new EventHandler<WindowEvent>(){

            public void handle(WindowEvent event) {
                if (ObjectUtil.isNotEmpty(stage)) {
                    stage.close();
                }
            }
        });
        this.handlerMenue();
        GUIState.getScene().getStylesheets().add(this.getClass().getResource("/css/common/Common.css").toExternalForm());
        GUIState.getScene().getStylesheets().add(this.getClass().getResource("/css/index/Index.css").toExternalForm());
        this.bigLeftPane.setOnMousePressed(e -> e.consume());
        this.smallLeftPane.setOnMousePressed(e -> e.consume());
        this.expandTitlePanes();
        this.buildPopup();
        for (Node node : this.smallLeftPane.getChildren()) {
            if (!(node instanceof Button)) continue;
            Button child = (Button)node;
            child.setTooltip(new Tooltip(child.getText()));
        }
        for (Node node : this.bigLeftPane.getChildren()) {
            nodeMap.put((String)node.getUserData(), node);
            node.setOnMouseClicked(e -> this.expandedOther(node));
        }
        this.tabPane.setStyle("-fx-background-color: #F7FAFB;");
        ThreadUtil.excAsync((Runnable)new Runnable(){

            @Override
            public void run() {
                Platform.runLater(() -> {
                    if ("0".equals(((GetUserOutData)CacheUtil.get("logInUser")).getUserLoginSta())) {
                        GysApplication.showView(RestPasswordView.class, (Modality)Modality.APPLICATION_MODAL);
                    }
                });
            }
        }, (boolean)true);
        this.init();
    }

    private void handlerMenue() {
        HttpJson httpJson = GysUtil.getResByUser();
        if (httpJson.isSuccess()) {
            List resourceOutDatas = JSON.parseArray((String)httpJson.getMsg(), GetResourceOutData.class);
            for (int i = 0; i < resourceOutDatas.size(); ++i) {
                GetResourceOutData item = (GetResourceOutData)resourceOutDatas.get(i);
                this.samllMenue(item, this.smallLeftPane);
                this.bigMenue(item, this.bigLeftPane);
            }
        } else {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", httpJson.getMsg());
            alert.showAndWait();
        }
    }

    private void samllMenue(GetResourceOutData item, VBox node) {
        Button button = new Button(item.getTitle());
        FontAwesomeIconView fontAwesomeIconView = new FontAwesomeIconView();
        fontAwesomeIconView.setStyleClass(item.getIcon());
        button.setGraphic((Node)fontAwesomeIconView);
        button.setUserData(item.getName());
        node.getChildren().add(button);
    }

    private void bigMenue(GetResourceOutData item, VBox node) {
        TitledPane titledPane = new TitledPane();
        titledPane.setText(item.getTitle());
        titledPane.setStyle("-fx-text-fill: white;-fx-font-size: 14px;");
        FontAwesomeIconView fontAwesomeIconView = new FontAwesomeIconView();
        fontAwesomeIconView.setStyleClass(item.getIcon());
        titledPane.setGraphic((Node)fontAwesomeIconView);
        titledPane.setUserData(item.getName());
        node.getChildren().add(titledPane);
        if (ObjectUtil.isNotEmpty(item.getNodes())) {
            VBox vBox = new VBox();
            for (int i = 0; i < item.getNodes().size(); ++i) {
                this.childMenue(vBox, item.getNodes().get(i), titledPane);
            }
        }
    }

    private void childMenue(VBox vBox, GetResourceOutData item, TitledPane titledPane) {
        this.childMenueMap.put(item.getName(), item);
        Button button = new Button(item.getTitle());
        button.setUserData(item.getName());
        button.setOnAction(e -> this.leftNaveClick((ActionEvent)e));
        FontAwesomeIconView fontAwesomeIconView = new FontAwesomeIconView();
        fontAwesomeIconView.setStyleClass(item.getIcon());
        vBox.getChildren().add(button);
        titledPane.setContent((Node)vBox);
    }

    private void buildPopup() {
        ObservableList<Node> nodes = this.smallLeftPane.getChildren();
        Map<String, TitledPane> titledPaneMap = this.getTitlePane();
        for (Node node : nodes) {
            Popup popup;
            Button b;
            if (!(node instanceof Button) || !titledPaneMap.containsKey((b = (Button)node).getText()) || (popup = this.popupMap.get(b)) != null) continue;
            popup = this.buildPopup(b, titledPaneMap.get(b.getText()));
            this.popupMap.put(b, popup);
        }
    }

    private Popup buildPopup(Button b, TitledPane titledPane) {
        Popup popup = new Popup();
        popup.setAutoHide(true);
        VBox box = new VBox();
        box.getStyleClass().add("popup-nav");
        Button first = new Button(titledPane.getText());
        first.getStyleClass().add("first-nav");
        box.getChildren().add(first);
        Node node = titledPane.getContent();
        if (node instanceof VBox) {
            ObservableList<Node> children = ((VBox)node).getChildren();
            for (Node n2 : children) {
                if (!(n2 instanceof Button)) continue;
                Button l = (Button)n2;
                Button label = new Button(l.getText());
                label.getStyleClass().add("child-nav");
                FontAwesomeIconView fontIcon = new FontAwesomeIconView();
                fontIcon.getStyleClass().add("nav-circle");
                label.setUserData(l.getUserData());
                label.setOnAction(l.getOnAction());
                box.getChildren().add(label);
            }
        }
        popup.getContent().add(box);
        box.setOnMouseEntered(e1 -> popup.show(b.getScene().getWindow(), b.getScene().getWindow().getX() + b.localToScene(0.0, 0.0).getX() + b.getScene().getX() + b.getWidth() - 1.0, b.getScene().getWindow().getY() + b.localToScene(0.0, 0.0).getY() + b.getScene().getY()));
        box.setOnMouseExited(e2 -> popup.hide());
        b.setOnMouseEntered(e -> popup.show(b.getScene().getWindow(), b.getScene().getWindow().getX() + b.localToScene(0.0, 0.0).getX() + b.getScene().getX() + b.getWidth() - 1.0, b.getScene().getWindow().getY() + b.localToScene(0.0, 0.0).getY() + b.getScene().getY()));
        b.setOnMousePressed(e -> popup.show(b.getScene().getWindow(), b.getScene().getWindow().getX() + b.localToScene(0.0, 0.0).getX() + b.getScene().getX() + b.getWidth() - 1.0, b.getScene().getWindow().getY() + b.localToScene(0.0, 0.0).getY() + b.getScene().getY()));
        b.setOnMouseExited(e -> {
            double w = b.getScene().getWindow().getX() + b.localToScene(0.0, 0.0).getX() + b.getScene().getX() + b.getWidth();
            double h = b.getScene().getWindow().getY() + b.localToScene(0.0, 0.0).getY() + b.getScene().getY();
            if (!(e.getScreenX() >= w - 5.0 && e.getScreenX() <= w + 5.0 && e.getScreenY() >= h && e.getScreenY() <= h + b.getHeight() + 10.0)) {
                popup.hide();
            }
        });
        popup.showingProperty().addListener((ob, o, n) -> {
            if (n.booleanValue()) {
                b.setStyle("-fx-background-color: #2C3B59");
            } else {
                b.getStyleClass().remove("nav-show");
            }
        });
        return popup;
    }

    private Map<String, TitledPane> getTitlePane() {
        HashMap<String, TitledPane> resultMap = new HashMap<String, TitledPane>();
        ObservableList<Node> nodes = this.bigLeftPane.getChildren();
        for (Node node : nodes) {
            TitledPane titledPane;
            if (!(node instanceof TitledPane) || (titledPane = (TitledPane)node).getText().trim().equals("")) continue;
            resultMap.put(titledPane.getText(), titledPane);
        }
        return resultMap;
    }

    public void expandTitlePanes() {
        ObservableList<Node> nodes = this.bigLeftPane.getChildren();
        for (Node node : nodes) {
            if (!(node instanceof TitledPane)) continue;
            TitledPane titledPane = (TitledPane)node;
            titledPane.setExpanded(false);
        }
    }

    public void expandedOther(Node titledPane) {
        for (Node node : this.bigLeftPane.getChildren()) {
            TitledPane tmp;
            if (!(node instanceof TitledPane) || (tmp = (TitledPane)node) == titledPane || !tmp.isExpanded()) continue;
            tmp.setExpanded(false);
        }
    }

    public void tongleLeftPane() {
        if (this.bigLeftPane.isVisible()) {
            this.bigLeftPane.setVisible(false);
            this.smallLeftPane.setVisible(true);
            this.leftPane.setPrefWidth(50.0);
        } else {
            this.bigLeftPane.setVisible(true);
            this.smallLeftPane.setVisible(false);
            this.leftPane.setPrefWidth(220.0);
        }
    }

    private void changeView(Node node) {
        if (this.contentPane.getChildren().size() < 1) {
            return;
        }
        this.contentPane.getChildren().clear();
        this.contentPane.getChildren().add(node);
        this.contentPane.requestLayout();
    }

    public VBox getBigLeftPane() {
        return this.bigLeftPane;
    }

    public BorderPane getBorderPane() {
        return this.borderPane;
    }

    public VBox getSmallLeftPane() {
        return this.smallLeftPane;
    }

    public ScrollPane getLeftPane() {
        return this.leftPane;
    }

    public ScrollPane getScrollContentPane() {
        return this.scrollContentPane;
    }

    public StackPane getContentPane() {
        return this.contentPane;
    }

    public MemberAddOrEditController getMemberController() {
        return this.memberController;
    }

    public LocalSettingController getLocalSettingController() {
        return this.localSettingController;
    }

    public SaleScheduleSettingController getSaleScheduleSettingController() {
        return this.saleScheduleSettingController;
    }

    public ExampleController getExampleController() {
        return this.exampleController;
    }

    public ShopSortSettingController getShopSortSettingController() {
        return this.shopSortSettingController;
    }

    public ProductSortSettingController getProductSortSettingController() {
        return this.productSortSettingController;
    }

    public SaleBillSettingController getSaleBillSettingController() {
        return this.saleBillSettingController;
    }

    public MemberCardReportController getMemberCardReportController() {
        return this.memberCardReportController;
    }

    public MemberPointReportController getMemberPointReportController() {
        return this.memberPointReportController;
    }

    public SaleDetailReportController getSaleDetailReportController() {
        return this.saleDetailReportController;
    }

    public TopController getTopController() {
        return this.topController;
    }

    public Map<Button, Popup> getPopupMap() {
        return this.popupMap;
    }

    public Map<String, GetResourceOutData> getChildMenueMap() {
        return this.childMenueMap;
    }

    public TabPane getTabPane() {
        return this.tabPane;
    }

    public Map<String, Tab> getTabMap() {
        return this.tabMap;
    }

    public boolean isFlag() {
        return this.flag;
    }

    public SalesReceiptsMainController getSalesReceiptsMainController() {
        return this.salesReceiptsMainController;
    }

    public Timer getTimer() {
        return this.timer;
    }

    public void setBorderPane(BorderPane borderPane) {
        this.borderPane = borderPane;
    }

    public void setBigLeftPane(VBox bigLeftPane) {
        this.bigLeftPane = bigLeftPane;
    }

    public void setSmallLeftPane(VBox smallLeftPane) {
        this.smallLeftPane = smallLeftPane;
    }

    public void setLeftPane(ScrollPane leftPane) {
        this.leftPane = leftPane;
    }

    public void setScrollContentPane(ScrollPane scrollContentPane) {
        this.scrollContentPane = scrollContentPane;
    }

    public void setContentPane(StackPane contentPane) {
        this.contentPane = contentPane;
    }

    public void setMemberController(MemberAddOrEditController memberController) {
        this.memberController = memberController;
    }

    public void setLocalSettingController(LocalSettingController localSettingController) {
        this.localSettingController = localSettingController;
    }

    public void setSaleScheduleSettingController(SaleScheduleSettingController saleScheduleSettingController) {
        this.saleScheduleSettingController = saleScheduleSettingController;
    }

    public void setExampleController(ExampleController exampleController) {
        this.exampleController = exampleController;
    }

    public void setShopSortSettingController(ShopSortSettingController shopSortSettingController) {
        this.shopSortSettingController = shopSortSettingController;
    }

    public void setProductSortSettingController(ProductSortSettingController productSortSettingController) {
        this.productSortSettingController = productSortSettingController;
    }

    public void setSaleBillSettingController(SaleBillSettingController saleBillSettingController) {
        this.saleBillSettingController = saleBillSettingController;
    }

    public void setMemberCardReportController(MemberCardReportController memberCardReportController) {
        this.memberCardReportController = memberCardReportController;
    }

    public void setMemberPointReportController(MemberPointReportController memberPointReportController) {
        this.memberPointReportController = memberPointReportController;
    }

    public void setSaleDetailReportController(SaleDetailReportController saleDetailReportController) {
        this.saleDetailReportController = saleDetailReportController;
    }

    public void setTopController(TopController topController) {
        this.topController = topController;
    }

    public void setPopupMap(Map<Button, Popup> popupMap) {
        this.popupMap = popupMap;
    }

    public void setChildMenueMap(Map<String, GetResourceOutData> childMenueMap) {
        this.childMenueMap = childMenueMap;
    }

    public void setTabPane(TabPane tabPane) {
        this.tabPane = tabPane;
    }

    public void setTabMap(Map<String, Tab> tabMap) {
        this.tabMap = tabMap;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public void setSalesReceiptsMainController(SalesReceiptsMainController salesReceiptsMainController) {
        this.salesReceiptsMainController = salesReceiptsMainController;
    }

    public void setTimer(Timer timer) {
        this.timer = timer;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof IndexController)) {
            return false;
        }
        IndexController other = (IndexController)o;
        if (!other.canEqual(this)) {
            return false;
        }
        BorderPane this$borderPane = this.getBorderPane();
        BorderPane other$borderPane = other.getBorderPane();
        if (this$borderPane == null ? other$borderPane != null : !this$borderPane.equals(other$borderPane)) {
            return false;
        }
        VBox this$bigLeftPane = this.getBigLeftPane();
        VBox other$bigLeftPane = other.getBigLeftPane();
        if (this$bigLeftPane == null ? other$bigLeftPane != null : !this$bigLeftPane.equals(other$bigLeftPane)) {
            return false;
        }
        VBox this$smallLeftPane = this.getSmallLeftPane();
        VBox other$smallLeftPane = other.getSmallLeftPane();
        if (this$smallLeftPane == null ? other$smallLeftPane != null : !this$smallLeftPane.equals(other$smallLeftPane)) {
            return false;
        }
        ScrollPane this$leftPane = this.getLeftPane();
        ScrollPane other$leftPane = other.getLeftPane();
        if (this$leftPane == null ? other$leftPane != null : !this$leftPane.equals(other$leftPane)) {
            return false;
        }
        ScrollPane this$scrollContentPane = this.getScrollContentPane();
        ScrollPane other$scrollContentPane = other.getScrollContentPane();
        if (this$scrollContentPane == null ? other$scrollContentPane != null : !this$scrollContentPane.equals(other$scrollContentPane)) {
            return false;
        }
        StackPane this$contentPane = this.getContentPane();
        StackPane other$contentPane = other.getContentPane();
        if (this$contentPane == null ? other$contentPane != null : !this$contentPane.equals(other$contentPane)) {
            return false;
        }
        MemberAddOrEditController this$memberController = this.getMemberController();
        MemberAddOrEditController other$memberController = other.getMemberController();
        if (this$memberController == null ? other$memberController != null : !this$memberController.equals(other$memberController)) {
            return false;
        }
        LocalSettingController this$localSettingController = this.getLocalSettingController();
        LocalSettingController other$localSettingController = other.getLocalSettingController();
        if (this$localSettingController == null ? other$localSettingController != null : !this$localSettingController.equals(other$localSettingController)) {
            return false;
        }
        SaleScheduleSettingController this$saleScheduleSettingController = this.getSaleScheduleSettingController();
        SaleScheduleSettingController other$saleScheduleSettingController = other.getSaleScheduleSettingController();
        if (this$saleScheduleSettingController == null ? other$saleScheduleSettingController != null : !(this$saleScheduleSettingController).equals(other$saleScheduleSettingController)) {
            return false;
        }
        ExampleController this$exampleController = this.getExampleController();
        ExampleController other$exampleController = other.getExampleController();
        if (this$exampleController == null ? other$exampleController != null : !this$exampleController.equals(other$exampleController)) {
            return false;
        }
        ShopSortSettingController this$shopSortSettingController = this.getShopSortSettingController();
        ShopSortSettingController other$shopSortSettingController = other.getShopSortSettingController();
        if (this$shopSortSettingController == null ? other$shopSortSettingController != null : !(this$shopSortSettingController).equals(other$shopSortSettingController)) {
            return false;
        }
        ProductSortSettingController this$productSortSettingController = this.getProductSortSettingController();
        ProductSortSettingController other$productSortSettingController = other.getProductSortSettingController();
        if (this$productSortSettingController == null ? other$productSortSettingController != null : !(this$productSortSettingController).equals(other$productSortSettingController)) {
            return false;
        }
        SaleBillSettingController this$saleBillSettingController = this.getSaleBillSettingController();
        SaleBillSettingController other$saleBillSettingController = other.getSaleBillSettingController();
        if (this$saleBillSettingController == null ? other$saleBillSettingController != null : !(this$saleBillSettingController).equals(other$saleBillSettingController)) {
            return false;
        }
        MemberCardReportController this$memberCardReportController = this.getMemberCardReportController();
        MemberCardReportController other$memberCardReportController = other.getMemberCardReportController();
        if (this$memberCardReportController == null ? other$memberCardReportController != null : !this$memberCardReportController.equals(other$memberCardReportController)) {
            return false;
        }
        MemberPointReportController this$memberPointReportController = this.getMemberPointReportController();
        MemberPointReportController other$memberPointReportController = other.getMemberPointReportController();
        if (this$memberPointReportController == null ? other$memberPointReportController != null : !this$memberPointReportController.equals(other$memberPointReportController)) {
            return false;
        }
        SaleDetailReportController this$saleDetailReportController = this.getSaleDetailReportController();
        SaleDetailReportController other$saleDetailReportController = other.getSaleDetailReportController();
        if (this$saleDetailReportController == null ? other$saleDetailReportController != null : !this$saleDetailReportController.equals(other$saleDetailReportController)) {
            return false;
        }
        TopController this$topController = this.getTopController();
        TopController other$topController = other.getTopController();
        if (this$topController == null ? other$topController != null : !(this$topController).equals(other$topController)) {
            return false;
        }
        Map<Button, Popup> this$popupMap = this.getPopupMap();
        Map<Button, Popup> other$popupMap = other.getPopupMap();
        if (this$popupMap == null ? other$popupMap != null : !(this$popupMap).equals(other$popupMap)) {
            return false;
        }
        Map<String, GetResourceOutData> this$childMenueMap = this.getChildMenueMap();
        Map<String, GetResourceOutData> other$childMenueMap = other.getChildMenueMap();
        if (this$childMenueMap == null ? other$childMenueMap != null : !(this$childMenueMap).equals(other$childMenueMap)) {
            return false;
        }
        TabPane this$tabPane = this.getTabPane();
        TabPane other$tabPane = other.getTabPane();
        if (this$tabPane == null ? other$tabPane != null : !this$tabPane.equals(other$tabPane)) {
            return false;
        }
        Map<String, Tab> this$tabMap = this.getTabMap();
        Map<String, Tab> other$tabMap = other.getTabMap();
        if (this$tabMap == null ? other$tabMap != null : !(this$tabMap).equals(other$tabMap)) {
            return false;
        }
        if (this.isFlag() != other.isFlag()) {
            return false;
        }
        SalesReceiptsMainController this$salesReceiptsMainController = this.getSalesReceiptsMainController();
        SalesReceiptsMainController other$salesReceiptsMainController = other.getSalesReceiptsMainController();
        if (this$salesReceiptsMainController == null ? other$salesReceiptsMainController != null : !(this$salesReceiptsMainController).equals(other$salesReceiptsMainController)) {
            return false;
        }
        Timer this$timer = this.getTimer();
        Timer other$timer = other.getTimer();
        return !(this$timer == null ? other$timer != null : !this$timer.equals(other$timer));
    }

    protected boolean canEqual(Object other) {
        return other instanceof IndexController;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        BorderPane $borderPane = this.getBorderPane();
        result = result * 59 + ($borderPane == null ? 43 : $borderPane.hashCode());
        VBox $bigLeftPane = this.getBigLeftPane();
        result = result * 59 + ($bigLeftPane == null ? 43 : $bigLeftPane.hashCode());
        VBox $smallLeftPane = this.getSmallLeftPane();
        result = result * 59 + ($smallLeftPane == null ? 43 : $smallLeftPane.hashCode());
        ScrollPane $leftPane = this.getLeftPane();
        result = result * 59 + ($leftPane == null ? 43 : $leftPane.hashCode());
        ScrollPane $scrollContentPane = this.getScrollContentPane();
        result = result * 59 + ($scrollContentPane == null ? 43 : $scrollContentPane.hashCode());
        StackPane $contentPane = this.getContentPane();
        result = result * 59 + ($contentPane == null ? 43 : $contentPane.hashCode());
        MemberAddOrEditController $memberController = this.getMemberController();
        result = result * 59 + ($memberController == null ? 43 : $memberController.hashCode());
        LocalSettingController $localSettingController = this.getLocalSettingController();
        result = result * 59 + ($localSettingController == null ? 43 : $localSettingController.hashCode());
        SaleScheduleSettingController $saleScheduleSettingController = this.getSaleScheduleSettingController();
        result = result * 59 + ($saleScheduleSettingController == null ? 43 : ($saleScheduleSettingController).hashCode());
        ExampleController $exampleController = this.getExampleController();
        result = result * 59 + ($exampleController == null ? 43 : $exampleController.hashCode());
        ShopSortSettingController $shopSortSettingController = this.getShopSortSettingController();
        result = result * 59 + ($shopSortSettingController == null ? 43 : ($shopSortSettingController).hashCode());
        ProductSortSettingController $productSortSettingController = this.getProductSortSettingController();
        result = result * 59 + ($productSortSettingController == null ? 43 : ($productSortSettingController).hashCode());
        SaleBillSettingController $saleBillSettingController = this.getSaleBillSettingController();
        result = result * 59 + ($saleBillSettingController == null ? 43 : ($saleBillSettingController).hashCode());
        MemberCardReportController $memberCardReportController = this.getMemberCardReportController();
        result = result * 59 + ($memberCardReportController == null ? 43 : $memberCardReportController.hashCode());
        MemberPointReportController $memberPointReportController = this.getMemberPointReportController();
        result = result * 59 + ($memberPointReportController == null ? 43 : $memberPointReportController.hashCode());
        SaleDetailReportController $saleDetailReportController = this.getSaleDetailReportController();
        result = result * 59 + ($saleDetailReportController == null ? 43 : $saleDetailReportController.hashCode());
        TopController $topController = this.getTopController();
        result = result * 59 + ($topController == null ? 43 : ($topController).hashCode());
        Map<Button, Popup> $popupMap = this.getPopupMap();
        result = result * 59 + ($popupMap == null ? 43 : ($popupMap).hashCode());
        Map<String, GetResourceOutData> $childMenueMap = this.getChildMenueMap();
        result = result * 59 + ($childMenueMap == null ? 43 : ($childMenueMap).hashCode());
        TabPane $tabPane = this.getTabPane();
        result = result * 59 + ($tabPane == null ? 43 : $tabPane.hashCode());
        Map<String, Tab> $tabMap = this.getTabMap();
        result = result * 59 + ($tabMap == null ? 43 : ($tabMap).hashCode());
        result = result * 59 + (this.isFlag() ? 79 : 97);
        SalesReceiptsMainController $salesReceiptsMainController = this.getSalesReceiptsMainController();
        result = result * 59 + ($salesReceiptsMainController == null ? 43 : ($salesReceiptsMainController).hashCode());
        Timer $timer = this.getTimer();
        result = result * 59 + ($timer == null ? 43 : $timer.hashCode());
        return result;
    }

    public String toString() {
        return "IndexController(borderPane=" + this.getBorderPane() + ", bigLeftPane=" + this.getBigLeftPane() + ", smallLeftPane=" + this.getSmallLeftPane() + ", leftPane=" + this.getLeftPane() + ", scrollContentPane=" + this.getScrollContentPane() + ", contentPane=" + this.getContentPane() + ", memberController=" + this.getMemberController() + ", localSettingController=" + this.getLocalSettingController() + ", saleScheduleSettingController=" + this.getSaleScheduleSettingController() + ", exampleController=" + this.getExampleController() + ", shopSortSettingController=" + this.getShopSortSettingController() + ", productSortSettingController=" + this.getProductSortSettingController() + ", saleBillSettingController=" + this.getSaleBillSettingController() + ", memberCardReportController=" + this.getMemberCardReportController() + ", memberPointReportController=" + this.getMemberPointReportController() + ", saleDetailReportController=" + this.getSaleDetailReportController() + ", topController=" + this.getTopController() + ", popupMap=" + this.getPopupMap() + ", childMenueMap=" + this.getChildMenueMap() + ", tabPane=" + this.getTabPane() + ", tabMap=" + this.getTabMap() + ", flag=" + this.isFlag() + ", salesReceiptsMainController=" + this.getSalesReceiptsMainController() + ", timer=" + this.getTimer() + ")";
    }

    static {
        nodeMap = new HashMap<String, Node>();
    }
}

